<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreatePublishingAccountsTable extends Migration
{
    const TABLE = 'publishing_accounts';
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create(self::TABLE, function (Blueprint $table) {
            $table->uuid('id');
            $table->string("group_code");
            $table->string('name');
            $table->string("qr_code");
            $table->unsignedTinyInteger('disabled')->default(0);
            $table->string('app_id')->default("");
            $table->string('secret')->default("");

            $table->primary("id");
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists(self::TABLE);
    }
}
